package com.itheima.edu.info.manager.day7;

import java.util.ArrayList;
import java.util.Iterator;

public class DeDaiQi {
    public static void main(String[] args) {
        ArrayList<String>list=new ArrayList<>();
        list.add("aa");
        list.add("aa1");
        list.add("aa2");
        list.add("aa3");
        list.add("aa4");
        Iterator<String> it=list.iterator();
        while (it.hasNext()){
            System.out.println(it.next());
        }
        for (String s : list) {
            System.out.println(s);
        }
        int []arr={1,2,3,4,5,6};
        for (int i : arr) {
            System.out.println(i);
        }
    }


}
